package com.sky.controller.users;


import com.sky.result.Result;
import com.sky.service.CategoriesService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @author majun
 * @package com.sky.controller.users
 * @date 2025/6/21 20:59
 */
@RestController
@RequestMapping("/user/categories")
@Slf4j
public class UserCategoriesController {

    @Autowired
    private CategoriesService categoriesService;

    /**
     * 获取前7个分类名称
     * @return 响应结果
     */
    @GetMapping("/getCategoriesNames")
    private Result<List<String>> getCategoriesNames() {

        return Result.success(categoriesService.getCategoriesNames());

    }

}
